kern/file: Ensure file->data is set
authorB Horn <b@horn.uk>
Sun, 12 May 2024 02:01:40 +0000 (03:01 +0100)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
commit7973cbca0ee83c711b62ef7ce6537f1913d97902
tree07a16bcad06c9a772c93037c1f837aa367fac768
parent5171d30be655b5f18294edc6009431ede36911c4
kern/file: Ensure file->data is set

This is to avoid a generic issue were some filesystems would not set
data and also not set a grub_errno. This meant it was possible for many
filesystems to grub_dl_unref() themselves multiple times resulting in
it being possible to unload the filesystems while there were still
references to them, e.g., via a loopback.

Reported-by: B Horn <b@horn.uk>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name kern-file-Ensure-file-data-is-set.patch
grub-core/kern/file.c